package ru.spbu.math.seabattle.client.jms.gui;

import java.awt.Color;
import java.awt.Rectangle;

public class Constants {

	//constants for frame
	private static final int FRAME_WIDTH = 800;
	private static final int FRAME_HEIGHT = 500;
	private static final int FRAME_OFFSET_X = 100;
	private static final int FRAME_OFFSET_Y = 50;
	
	private static final int LOGIN_FRAME_WIDTH = 340;
	private static final int LOGIN_FRAME_HEIGHT = 130;
	
	private static final int LIST_FRAME_WIDTH = 340;
	private static final int LIST_FRAME_HEIGHT = 500;

	
	//constants for field
	private static final int FIELD_ALIGNMENT_X = 30;
	private static final int FIELD_ALIGNMENT_Y = 30;
	private static final int FIELD_SIZE = 300;
	
	//constants for player list alignment 
//	private static final int PLAYER_ALIGNMENT_X = 600;
	private static final int PLAYER_ALIGNMENT_X = 10;
	private static final int PLAYER_ALIGNMENT_Y = 10;
//	private static final int PLAYER_WIDTH = 195;
	private static final int PLAYER_WIDTH = 310;
	private static final int PLAYER_HEIGHT = 450;
	
	//constants for message rectangle
	private static final int MESSAGE_OFFSET_Y = 50;
	private static final int MESSAGE_OFFSET_X = 50;
	private static final int MESSAGE_HEIGHT = 50;
	
	//constants for finishPlacingShip button
//	private static final int FINISH_PLACING_SHIP_X = 50;
//	private static final int FINISH_PLACING_SHIP_Y = FRAME_HEIGHT - 100;
//	private static final int FINISH_PLACING_SHIP_HEIGHT = 40;
//	private static final int FINISH_PLACING_SHIP_WIDTH = 80;
		
	//rectangles
	private static final Rectangle FRAME_RECTANGLE = 
		new Rectangle(FRAME_OFFSET_X, FRAME_OFFSET_Y, FRAME_WIDTH, FRAME_HEIGHT);
	private static final Rectangle LOGIN_FRAME_RECTANGLE =
		new Rectangle(FRAME_OFFSET_X, FRAME_OFFSET_Y, LOGIN_FRAME_WIDTH, LOGIN_FRAME_HEIGHT);
	private static final Rectangle LIST_FRAME_RECTANGLE =
		new Rectangle(FRAME_OFFSET_X, FRAME_OFFSET_Y, LIST_FRAME_WIDTH, LIST_FRAME_HEIGHT);

	private static final Rectangle PLAYER_LIST_RECTANGLE = 
		new Rectangle(PLAYER_ALIGNMENT_X, PLAYER_ALIGNMENT_Y, PLAYER_WIDTH, PLAYER_HEIGHT);
	private static final Rectangle PLAYER_FIELD_RECTANGLE = 
		new Rectangle(FIELD_ALIGNMENT_X, FIELD_ALIGNMENT_Y, FIELD_SIZE, FIELD_SIZE);
	private static final Rectangle ENEMY_FIELD_RECTANGLE = 
		new Rectangle(FRAME_WIDTH - FIELD_ALIGNMENT_X - FIELD_SIZE, FIELD_ALIGNMENT_Y, FIELD_SIZE, FIELD_SIZE);
	private static final Rectangle MESSAGE_RECTANGLE = 
		new Rectangle(MESSAGE_OFFSET_X, FRAME_HEIGHT - MESSAGE_OFFSET_Y - MESSAGE_HEIGHT, FRAME_WIDTH - 2 * MESSAGE_OFFSET_X, MESSAGE_HEIGHT);
	
	// cells colors
	private static final Color SHIP_COLOR = Color.GRAY;
	private static final Color DAMAGED_SHIP_COLOR = Color.RED;
	private static final Color SHOT_CELL_COLOR = Color.DARK_GRAY;
	
	public static Color getShipColor() {
		return SHIP_COLOR;
	}
	public static Color getDamagedShipColor() {
		return DAMAGED_SHIP_COLOR;
	}
	public static Color getShotCellColor() {
		return SHOT_CELL_COLOR;
	}
	
	public static Rectangle getFrameRectangle() {
		return FRAME_RECTANGLE;
	}
	public static Rectangle getPlayerListRectangle() {
		return PLAYER_LIST_RECTANGLE;
	}
	public static Rectangle getPlayerFieldRectangle() {
		return PLAYER_FIELD_RECTANGLE;
	}
	public static Rectangle getEnemyFieldRectangle() {
		return ENEMY_FIELD_RECTANGLE;
	}
	
	public static Rectangle getMessageRectangle() {
		return MESSAGE_RECTANGLE;
	}
	
	public static Rectangle getLoginFrameRectangle() {
		return LOGIN_FRAME_RECTANGLE;
	}
	
	public static Rectangle getListFrameRectangle() {
		return LIST_FRAME_RECTANGLE;
	}
}
